home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frm_MMind
- BorderStyle = 0 'None
- Caption = "Form1"
- ClientHeight = 7170
- ClientLeft = 1440
- ClientTop = 1290
- ClientWidth = 9570
- ForeColor = &H0000FFFF&
- Height = 7635
- Left = 1380
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- Picture = "FRM_MMIN.frx":0000
- ScaleHeight = 478
- ScaleMode = 3 'Pixel
- ScaleWidth = 638
- ShowInTaskbar = 0 'False
- Top = 885
- Width = 9690
- Begin VB.Timer Timer1
- Interval = 1000
- Left = 4560
- Top = 1080
- End
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 495
- Left = 9360
- TabIndex = 48
- Top = 600
- Visible = 0 'False
- Width = 375
- End
- Begin VB.Image Image3
- Height = 480
- Left = 8640
- Picture = "FRM_MMIN.frx":4B442
- Top = 2040
- Visible = 0 'False
- Width = 480
- End
- Begin VB.Image Image2
- Height = 480
- Left = 8040
- Picture = "FRM_MMIN.frx":4B74C
- Top = 2040
- Visible = 0 'False
- Width = 480
- End
- Begin Threed.SSCommand SS_Replay
- Height = 375
- Left = 4440
- TabIndex = 55
- Top = 6360
- Width = 735
- _Version = 65536
- _ExtentX = 1296
- _ExtentY = 661
- _StockProps = 78
- Caption = "Replay"
- ForeColor = -2147483630
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelWidth = 3
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 375
- Left = 7560
- TabIndex = 54
- Top = 120
- Width = 75
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":4BA56
- DragMode = 1 'Automatic
- Height = 1095
- Index = 9
- Left = 240
- TabIndex = 53
- Top = 720
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 1931
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":4BE98
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":4FBDA
- DragMode = 1 'Automatic
- Height = 1170
- Index = 8
- Left = 7800
- TabIndex = 52
- Top = 720
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2064
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":5001C
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":5420E
- DragMode = 1 'Automatic
- Height = 1170
- Index = 7
- Left = 6240
- TabIndex = 51
- Top = 1320
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2064
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":54650
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":56082
- DragMode = 1 'Automatic
- Height = 1155
- Index = 6
- Left = 6240
- TabIndex = 50
- Top = 120
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2037
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":564C4
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Label2"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FFFF&
- Height = 360
- Left = 480
- TabIndex = 49
- Top = 240
- Width = 840
- End
- Begin Threed.SSCommand SS_Dummy
- Height = 375
- Left = 9360
- TabIndex = 47
- Top = 120
- Visible = 0 'False
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Caption = "Dummy"
- ForeColor = -2147483630
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 4
- Left = 5520
- TabIndex = 46
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 5
- Left = 6480
- TabIndex = 45
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 6
- Left = 7440
- TabIndex = 44
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 7
- Left = 8400
- TabIndex = 43
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 8
- Left = 5520
- TabIndex = 42
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 9
- Left = 6480
- TabIndex = 41
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 10
- Left = 7440
- TabIndex = 40
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 11
- Left = 8400
- TabIndex = 39
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 12
- Left = 5520
- TabIndex = 38
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 13
- Left = 6480
- TabIndex = 37
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 14
- Left = 7440
- TabIndex = 36
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 15
- Left = 8400
- TabIndex = 35
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 16
- Left = 5520
- TabIndex = 34
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 17
- Left = 6480
- TabIndex = 33
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 18
- Left = 7440
- TabIndex = 32
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 19
- Left = 8400
- TabIndex = 31
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 19
- Left = 3120
- TabIndex = 30
- Tag = "3"
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 18
- Left = 2160
- TabIndex = 29
- Tag = "2"
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 17
- Left = 1200
- TabIndex = 28
- Tag = "1"
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 16
- Left = 240
- TabIndex = 27
- Tag = "0"
- Top = 6360
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 15
- Left = 3120
- TabIndex = 26
- Tag = "3"
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 14
- Left = 2160
- TabIndex = 25
- Tag = "2"
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 13
- Left = 1200
- TabIndex = 24
- Tag = "1"
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 12
- Left = 240
- TabIndex = 23
- Tag = "0"
- Top = 5520
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 11
- Left = 3120
- TabIndex = 22
- Tag = "3"
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 10
- Left = 2160
- TabIndex = 21
- Tag = "2"
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 9
- Left = 1200
- TabIndex = 20
- Tag = "1"
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 8
- Left = 240
- TabIndex = 19
- Tag = "0"
- Top = 4680
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 7
- Left = 3120
- TabIndex = 18
- Tag = "3"
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 6
- Left = 2160
- TabIndex = 17
- Tag = "2"
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 5
- Left = 1200
- TabIndex = 16
- Tag = "1"
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 4
- Left = 240
- TabIndex = 15
- Tag = "0"
- Top = 3840
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 3
- Left = 3120
- TabIndex = 14
- Tag = "3"
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 2
- Left = 2160
- TabIndex = 13
- Tag = "2"
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 1
- Left = 1200
- TabIndex = 12
- Tag = "1"
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Target
- Height = 780
- Index = 0
- Left = 240
- TabIndex = 11
- Tag = "0"
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 2
- Left = 7440
- TabIndex = 10
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 1
- Left = 6480
- TabIndex = 9
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 0
- Left = 5520
- TabIndex = 8
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_Result
- Height = 780
- Index = 3
- Left = 8400
- TabIndex = 7
- Top = 3000
- Visible = 0 'False
- Width = 900
- _Version = 65536
- _ExtentX = 1588
- _ExtentY = 1376
- _StockProps = 78
- AutoSize = 1
- End
- Begin Threed.SSCommand SS_quit
- Height = 375
- Left = 4440
- TabIndex = 6
- Top = 6720
- Width = 735
- _Version = 65536
- _ExtentX = 1296
- _ExtentY = 661
- _StockProps = 78
- Caption = "Quit"
- ForeColor = -2147483630
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelWidth = 3
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":57EA6
- DragMode = 1 'Automatic
- Height = 1170
- Index = 5
- Left = 4800
- TabIndex = 5
- Top = 1320
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2064
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":582E8
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":59D1A
- DragMode = 1 'Automatic
- Height = 1170
- Index = 4
- Left = 3360
- TabIndex = 4
- Top = 1320
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2064
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":5A15C
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":5BB8E
- DragMode = 1 'Automatic
- Height = 1155
- Index = 3
- Left = 1920
- TabIndex = 3
- Top = 1320
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2037
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":5BFD0
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":5D9B2
- DragMode = 1 'Automatic
- Height = 1155
- Index = 2
- Left = 4800
- TabIndex = 2
- Top = 120
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2037
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":5DDF4
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":5F7D6
- DragMode = 1 'Automatic
- Height = 1140
- Index = 0
- Left = 1920
- TabIndex = 1
- Top = 120
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2011
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":5FC18
- End
- Begin Threed.SSCommand SSCommand1
- DragIcon = "FRM_MMIN.frx":615AA
- DragMode = 1 'Automatic
- Height = 1155
- Index = 1
- Left = 3360
- TabIndex = 0
- Top = 120
- Width = 1320
- _Version = 65536
- _ExtentX = 2328
- _ExtentY = 2037
- _StockProps = 78
- ForeColor = -2147483630
- AutoSize = 2
- Picture = "FRM_MMIN.frx":619EC
- End
- Attribute VB_Name = "frm_MMind"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- 'Used as Source Index and Target Index
- Dim SI, TI As Integer
- 'Used as a Counter
- Dim Counter As Integer
- 'This is the computer chosen Pic_Pos array
- Dim PIC_Pos(3)
- 'This is the user chosen movements
- Dim U_Pic_POS(3)
- 'Used to hold the seconds and minutes
- Dim S_MIN, S_SEC As Integer
- Private Sub Form_Load()
- 'Positions the form at the middle of the screen
- Me.Top = (Screen.Height / 2) - (Me.Height / 2)
- Me.Left = (Screen.Width / 2) - (Me.Width / 2)
- 'Calls initilization procedure
- Call initilize
- 'Makes the First 4 targets visible
- For SI = 0 To 3
- SS_Target(SI).Visible = True
- Next SI
- 'Shows the Form(Window) so we can draw the line
- Me.Show
- 'Draws a line
- Call Make_Line(5, 171, 630, 171)
- End Sub
- Private Sub SS_quit_Click()
- 'Unloads the form to end the game
- Unload frm_MMind
- End Sub
- Private Sub SS_Replay_Click()
- 'This procesure is activated when the Replay
- 'Control is clicked
- Unload frm_MMind
- Beep
- frm_Start.Show
- End Sub
- Private Sub SS_Target_DragDrop(Index As Integer, Source As Control, x As Single, y As Single)
- 'This procedure handles dropping a pic
- 'from the source to the target control
-
- 'used as an index
- Dim I As Integer
-
- 'Used as a counter flag
- Static I2 As Integer
-
- 'Resets I2
- If I2 = 4 Then I2 = 0
- 'Makes sure the control is empty (No Picture in it)
- If SS_Target(Index).Picture = SS_Dummy.Picture Then
- SS_Target(Index).Picture = Source.Picture
- 'disables the source Control
- Source.Enabled = False
- 'disables the target control
- SS_Target(Index).Enabled = False
- U_Pic_POS(SS_Target(Index).Tag) = Source.Index
- 'adds one to the counter & I2
- Counter = Counter + 1
- I2 = I2 + 1
- End If
- If (Counter = 4) Or (Counter = 8) _
- Or (Counter = 12) Or (Counter = 16) _
- Or (Counter = 20) Then
- 'Calls the Check_win Procedure
- Call Check_win
- 'enables the source Controls
- For I = 0 To 9
- SSCommand1(I).Enabled = True
- Next I
- End If
- End Sub
- Public Sub Check_win()
- 'This procedure will check if there is
- 'a winning combination or not.
- 'used as an Index
- Dim I, Z, Looper1 As Integer
- 'If we haven't reached the game's end, then...
- If TI < 19 Then
- 'Makes the appropriate Result control Visible
- For TI = TI To TI + 3
- 'This Checks for Winning moves
- If U_Pic_POS(I) = PIC_Pos(I) Then
- SS_Result(TI).Caption = "Ok"
- SS_Result(TI).ForeColor = &HFFFF80
- SS_Result(TI).FontBold = True
- End If
-
- If U_Pic_POS(I) <> PIC_Pos(I) Then
- For Z = 0 To 3
- If ((U_Pic_POS(I) = PIC_Pos(Z)) And (I <> Z)) Then
- SS_Result(TI).Caption = "Maybe"
- SS_Result(TI).ForeColor = &HFF00FF
- SS_Result(TI).FontBold = True
- Z = 777 'to terminate
- Else
- SS_Result(TI).Caption = "No"
- SS_Result(TI).ForeColor = &HFFFF&
- SS_Result(TI).FontBold = True
- End If
- Next Z
- End If
- I = I + 1
- SS_Result(TI).Visible = True
- Next TI
- End If
- 'Handles Loosing
- If TI > 19 Then
- Label1.Caption = "YOU LOOSE"
- For Looper1 = 0 To 9
- SSCommand1(Looper1).Picture = Image3.Picture
- Next Looper1
- Timer1.Enabled = False
- End If
- 'This segment handles the actual winning combination
- If ((SS_Result(TI - 4).Caption = "Ok") And _
- (SS_Result(TI - 1).Caption = "Ok") And _
- (SS_Result(TI - 2).Caption = "Ok") And _
- (SS_Result(TI - 3).Caption = "Ok")) Then
- Timer1.Enabled = False
- Label1.Caption = "You WON"
- For Looper1 = 0 To 9
- SSCommand1(Looper1).Picture = Image2.Picture
- Next Looper1
- Exit Sub
- End If
- If SI < 19 Then
- 'Makes the appropriate Target control Visible
- For SI = SI To SI + 3
- SS_Target(SI).Visible = True
- Next SI
- End If
- End Sub
- Public Sub initilize()
- 'This routine initilizes the program
- 'Initilizes the SI and TI values
- SI = 0
- TI = 0
- 'Initilizes the Counter
- Counter = 0
- 'Initilizes the Time Variables
- S_MIN = 0
- S_SEC = 0
- Dim x, y, w, Z As Integer
- Randomize
- x = Int(10 * Rnd)
- PIC_Pos(0) = x
- Randomize
- y = Int(10 * Rnd)
- Do While (x = y)
- Randomize
- y = Int(10 * Rnd)
- Loop
- PIC_Pos(1) = y
- Randomize
- Z = Int(10 * Rnd)
- Do While (x = Z) Or (y = Z)
- Randomize
- Z = Int(10 * Rnd)
- Loop
- PIC_Pos(2) = Z
- Randomize
- w = Int(10 * Rnd)
- Do While (w = y) Or (w = x) Or (w = Z)
- Randomize
- w = Int(10 * Rnd)
- Loop
- PIC_Pos(3) = w
- End Sub
- Private Sub Timer1_Timer()
- 'Handles the seconds and minutes
- S_SEC = S_SEC + 1
- If S_SEC = 60 Then
- S_SEC = 0
- S_MIN = S_MIN + 1
- End If
- If S_SEC < 10 Then
- Label2.Caption = Str$(S_MIN) + ":0" + Str$(S_SEC)
- Label2.Caption = Str$(S_MIN) + ":" + Str$(S_SEC)
- End If
- End Sub
- Public Sub Make_Line(xa As Integer, ya As Integer, xb As Integer, yb As Integer)
- 'This procedure draws a line
- 'BTW... You can draw lines in much easier
- 'ways, but This was done for the heck of it :-)
- Dim dx, dy, p, x, y, Xend As Integer
- dx = Abs(xa - xb)
- dy = Abs(ya - yb)
- p = 2 * dy - dx
- 'Determines starting point
- If xa > xb Then
- x = xb
- y = yb
- Xend = xa
- x = xa
- y = ya
- Xend = xb
- End If
- PSet (x, y) 'The default ForeGround color is used
- While x < Xend
- x = x + 1
- If p < 0 Then
- p = p + 2 * dy
- Else
- y = y + 1
- p = p + 2 * (dy - dx)
- End If
- PSet (x, y)
- End Sub
-